import request from "@/util/request.js"


const getAll = ()=>{
    return request({
        url:"Material",
    })
}

const Query=(data)=>{
	return request({
		url:"Material/GetPage",
		params:data
	})
}

const Add=(data)=>{
	return request({
		url:"Material/Add",
		method:'post',
		data
		
	})
}

const Update=(data)=>{
	return request({
		url:"Material/Update",
		data,
		method:"put"
		
	})
	
}

const Delete=(id)=>{
	return request({
		url:"Material/"+id,
		method:"Delete"
	})
}

const GetOne=(id)=>{
	return request({
		url:"Material/GetOne",
		params:{id}
	})
}
export default {
    getAll,
	Query,
	Add,
	Update,
	Delete,
	GetOne
}